package com.zr.datamodel;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 地区
 * @author lym
 *
 */
@Entity
@Table(name="area")
public class AreaDM {

	//地区id
	private int id;
	
	//地区名
	private String name;
	private List<PointDM> points=new ArrayList<>();
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name="name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@OneToMany(mappedBy="area")
	public List<PointDM> getPoints() {
		return points;
	}

	public void setPoints(List<PointDM> points) {
		this.points = points;
	}
	
}
